<?php

class openapi_api_params_v1_login extends openapi_api_params_abstract implements openapi_api_params_interface{

    public function checkParams($method,$params,&$sub_msg,$defined_params=array(),$dataType='kv'){
        if(parent::checkParams($method,$params,$sub_msg,$defined_params,$dataType)){
            return true;
        }else{
            return false;
        }
    }

    public function getAppParams($method){
        $params = array(
            'success'=>array(
                'login_name' => array('required'=>'true','type'=>'string','name'=>'登录名'),
                'login_password'  => array('required'=>'true','type'=>'string','name'=>'登陆密码'),
                'login_token'   => array('required'=>'false','type' => 'string','name' => 'TOKEN'),
            ),
            'logout'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
            ),
            'lost'=>array(
                'email'=>array('required'=>'true','type'=>'string','name'=>'注册邮箱'),
            ),
        );
        return $params[$method];
    }

    public function description($method){
        $description = array(
            'success'=>array(
                'name'        =>'登陆接口',
                'description' =>'返回结果success表示成功，error表示错误',
            ),
            'logout'=>array(
                'name' => '退出登录接口',
                'description' => '返回success表示成功',
            ),
            'lost'=>array(
                'name' => '找回密码',
                'description' => '找回密码',
            ),
        );
        return $description[$method];
    }

}